[1] 924
Lecture 07 - Blocking and Clustering
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Elizabeth Shin | EJSHIN6 | 2520422 | elizabeth.shin@emory.edu |
| Emily Choi | ECHOI73 | 2492522 | emily.choi@emory.edu (?) |
| Esther Yang | QYANG68 | 2487073 | esther.yang2@emory.edu (?) |
| Zhiyi Li (Yolanda Li) | ZLIT23 | 2513881 | zhiyi.li@emory.edu |
| Angela Xie | JXIE82 | 2515217 | angela.xie@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Anushka Basu | ABASU9 | 2551669 | anushka.basu@emory.edu |
| Annie Cao | JCAO66 | 2599315 | annie.cao@emory.edu |
| Courtney Fitzgerald | CFITZG4 | 2484240 | courtney.fitzgerald@emory.edu |
| Harris Wang | MWAN467 | 2551003 | harris.wang@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Maura Dianno | MDIANNO | 2481848 | maura.dianno@emory.edu |
| Kush Bhatia | KBHATI7 | 2492303 | kush.bhatia@emory.edu |
| Shriya Iyer | SAIYER4 | 2493146 | shriya.iyer@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Sylvia Xing | JXING8 | 2549831 | sylvia.xing@emory.edu |
| Lucy Liu | CLIU452 | 2561533 | lucy.liu@emory.edu |
| Jessie Hao | JHAO23 | 2513298 | jessie.hao@emory.edu |
| Zoe Liu | SLIU547 | 2583239 | zoe.liu@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Dhwani Venkatarangan | DAVENKA | 2554493 | dhwani.venkatarangan@emory.edu |
| Anita Osuri | AOSURI2 | 2557540 | anita.osuri@emory.edu |
| Ahshar Brown | AOBROW2 | 2575182 | ahshar.brown@emory.edu |
| Adam Pastor | AMPASTO | 2565464 | adam.pastor@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Daniel Nickas | DNICKAS | 2549711 | daniel.nickas@emory.edu |
| Shuyang Yu | SYU1025 | 2610436 | shuyang.yu@emory.edu |
| Phoebe Pan | ZPAN66 | 2630423 | ziwen.pan@emory.edu |
| Xinyi Wang | XWAN878 | 2549813 | xinyi.wang@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Davis Boor | DBOOR | 2556176 | davis.boor@emory.edu |
| Xipu Wang | XWAN884 | 2551008 | xipu.wang@emory.edu |
| Miracle Ephraim | MEPHRAI | 2492732 | miracle.ephraim@emory.edu |
| Zihan Liang | ZLIAN57 | 2609381 | zihan.liang@emory.edu |
| Name | Login ID | SIS ID | |
|---|---|---|---|
| Evelyn Shi | CSHI59 | 2609525 | evelyn.shi2@emory.edu |
| Howie Brown | HJBROW5 | 2585210 | howie.brown@emory.edu |
| Maxwell Troilo | MTROILO | 2520874 | max.troilo@emory.edu |
| Lingxiao Chen | LCHE462 | 2562583 | lingxiao.chen@emory.edu (?) |
age, in our case)Source: Blair et al (2023)
\[ATE = \frac{1}{N}\sum_{i=1}^N y_{i,1} - y_{i,0}\]
\[ATE = \frac{1}{J}\sum_{j=1}^J\sum_{i=1}^{N_j} \frac{y_{i,1} - y_{i,0}}{N_j} = \sum_{j=1}^J \frac{N_j}{N}ATE_j\]
\[\widehat{ATE} = \sum_{j=1}^J \frac{N_j}{N}\widehat{ATE_j}\]
set.seed(12345)
# We have 10 units
N <- 10
# y0 is the potential outcome under control
y0 <- c(0, 0, 0, 1, 1, 3, 4, 5, 190, 200)
# For each unit, the treatment effect is intrinsic
tau <- c(10, 30, 200, 90, 10, 20, 30, 40, 90, 20)
# y1 is the potential outcome under treatment
y1 <- y0 + tau
# Two blocks: a and b
block <- c("a", "a", "a", "a", "a", "a", "b", "b", "b", "b")
# Z is the treatment assignment
# (in the code we use Z instead of T)
Z <- c(0, 0, 0, 0, 1, 1, 0, 0, 1, 1)
# Y is the observed outcome
Y <- Z * y1 + (1 - Z) * y0
# The data
dat <- data.frame(Z = Z, y0 = y0, y1 = y1, tau = tau, b = block, Y = Y)
head(dat) Z y0 y1 tau b Y
1 0 0 10 10 a 0
2 0 0 30 30 a 0
3 0 0 200 200 a 0
4 0 1 91 90 a 1
5 1 1 11 10 a 11
6 1 3 23 20 a 23
Estimate Std. Error t value Pr(>|t|) CI Lower CI Upper DF
(Intercept) 1.666667 0.9189366 1.813691 0.10728314 -0.4524049 3.785738 8
Z 131.833333 68.4173061 1.926900 0.09015082 -25.9372575 289.603924 8
Estimate Std. Error t value Pr(>|t|) CI Lower CI Upper DF
(Intercept) -32.42857 21.63212 -1.499093 0.17752759 -83.58042 18.72327 7
Z 114.78571 50.53715 2.271314 0.05736626 -4.71565 234.28708 7
blockb 102.28571 50.49783 2.025547 0.08245280 -17.12268 221.69411 7
How are they different? (The first one ignores the blocks. The second one uses a different set of weights, created using fixed effects variables or indicator/dummy variables)
And we can estimate the total ATE by adjusting the weights according to the size of the blocks:
Estimate Std. Error t value Pr(>|t|) CI Lower CI Upper DF
(Intercept) 1.95 0.250000 7.800000 0.0002340912 1.338272 2.561728 6
Z 108.25 12.530862 8.638672 0.0001325490 77.588086 138.911914 6
blockb_c 4.25 0.559017 7.602631 0.0002696413 2.882135 5.617865 6
Z:blockb_c 228.75 30.599224 7.475680 0.0002957945 153.876397 303.623603 6
Source: DeclareDesign (2018)
R with the estimatr package